package model;

import java.util.ArrayList;

public class Cellule {

	
	private int posX;
	private int posY;
	private int size;
	// Besoin d'utiliser une liste d'indidvidu par rapport au deplacement partager par les fourmi et les proie
	private ArrayList<Individu> IndividuList = new ArrayList<Individu>();
	
	private Cellule left;
	private Cellule up;
	private Cellule right;
	private Cellule down;
	
	public Cellule(int _posX,int _posY, int _size){
		posX = _posX;
		posY = _posY;
		size = _size;		
	}
	
	public Cellule getUp(){
		return up;
	}
	public Cellule getDown(){
		return down;
	}
	public Cellule getLeft(){
		return left;
	}
	public Cellule getRight(){
		return right;
	}
	
	public void setUp(Cellule _up){
		up = _up;
	}
	public void setDown(Cellule _down){
		down = _down;
	}
	public void setLeft(Cellule _left){
		left = _left;
	}
	public void setRight(Cellule _right){
		right = _right;
	}
	public void setNeightbour(Cellule _up,Cellule _right,Cellule _left,Cellule _down){
		setUp(_up);
		setDown(_right);
		setLeft(_left);
		setRight(_down);
	}
	
	public int getX(){
		return posX;
	}
	
	public int getY(){
		return posY;
	}
	
	public int getSize(){
		return size;
	}
	
	public void indivEntering(Individu _i){
		IndividuList.add(_i);
	}
	
	public void indivExit(Individu _i){
		IndividuList.remove(_i);
	}
			
	public boolean isBusy(){
		if(IndividuList.size()>0) return true;
		return false;
	}
}
